package com.petplanet.shop

import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.padding
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.navigation.compose.NavHost
import androidx.navigation.compose.composable
import androidx.navigation.compose.rememberNavController
import com.petplanet.shop.navigation.ShopDestination

@Composable
fun ShoppingPage() {
    val navController = rememberNavController()
    val startDestination = ShopDestination.ShoppingPage
    val currentDestination: ShopDestination by remember { mutableStateOf(startDestination) }

    NavHost(
        modifier = Modifier.padding(),
        navController = navController,
        startDestination = startDestination.route
    ){
        composable(currentDestination.route) {
            Box(modifier = Modifier.fillMaxSize(), contentAlignment = Alignment.Center){
                currentDestination.page()
            }
        }
    }
}